Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Relation R has eight attributes ABCDEFGH. Fie... Start Learning for Free
Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?
  • a)
    3
  • b)
    4
  • c)
    5
  • d)
    6
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Relation R has eight attributes ABCDEFGH. Fields of R contain only ato...
Here we can see that D is not part of any FD's , hence D must be part of the candidate key.

Now D+ ={ D}.

 Hence we have to add A,B,C,E,F,G,H  to D and check which of them are Candidate keys of size 2.

We can proceed as 

AD+= {A,B,C,D,E,F,G,H}

Similarly we see BD+ , ED+ and FD+ also gives us all the attributes.Hence AD,BD,ED,FD are definitely the candidate keys.

But CD+ , GD+ and HD+ doesnt give all the attributes hence CD,GD and HD are not candidate keys.

Now we need to check the candidate keys of size 3 . Since AD , BD, ED, FD are all candidate keys hence we can't find candidate keys by adding elements to them as they will give us superkeys as they are already minimal. Hence we have to proceed with CD,GD and HD.

 Also we can't add any of {A,B,E,F} to CD, GD, HD as they will again give us superset of {AD,BD,ED,FD} . 

Hence we can only add among {C,G,H} to CD, GD, HD.

Adding C to GD and HD we get GCD , HCD. Taking closure and we will see they are not candidate keys.

Adding H to GD we get GHD which is also not a candidate key.(no more options with 3 attributes possible)

Now we need to check for candidate keys with 4 attributes . Since only remaining options are CGH and we have to add D only possible key of size 4 is CGHD whose closure also doesn't give us all of the attributes in the relation(All possible options covered)

Hence no of candidate keys are 4 : AD,BD,ED,FD.
View all questions of this test
Most Upvoted Answer
Relation R has eight attributes ABCDEFGH. Fields of R contain only ato...
Explanation:

To find the number of candidate keys for the relation R, we need to first find the closure of each attribute set.

Closure of A:

A+ = A (from A - BC)

Closure of B:

B+ = BCFH (from B - CFH)

Closure of C:

C+ = CBFH (from B - CFH and CH - G)

Closure of D:

D+ = D (trivial)

Closure of E:

E+ = EA (from E - A)

Closure of F:

F+ = FEGACB (from F - EG, A - BC, B - CFH, and CH - G)

Closure of G:

G+ = G (trivial)

Closure of H:

H+ = HCFB (from B - CFH and CH - G)

From the above closures, we can see that the attributes A, D, E, and G are not present in any of the closures of other attributes. Therefore, they are the only possible candidates for the primary key.

Possible combinations of candidate keys:

ADEG

ADFG

AEEG

AEFG

We can see that only the second combination (ADFG) is a valid candidate key, as it is the only combination that includes all the attributes of the relation.

Therefore, the number of candidate keys for the relation R is 4.

Answer: (b) 4
Free Test
Community Answer
Relation R has eight attributes ABCDEFGH. Fields of R contain only ato...
Since D does not create any dependencies, it is a sure part of the candidate key. Now, AD+ is a candidate key (found out by hit and trial method. D will always be a part of the candidate key no matter what). By using E->A, substitute the AD with ED. ED+ is also a candidate key now. By using F-> EG, we can say F->E and F->G. Substitute E by F in ED and FD+ is also a cand key. Similarly, using B->CFH, subs F in FD with B. Hence BD is also a cand key. Total of 4 cand keys are possible.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer?
Question Description
Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer?.
Solutions for Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?a)3b)4c)5d)6Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev